#ifndef _CGAMEMANAGE_H_
#define _CGAMEMANAGE_H_

#include "eConfig.h"

#define WATER_HEIGHT	(100)

class CGameManage : public cocos2d::CCLayer
{
public:
	CGameManage(void);
	~CGameManage(void);


	// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
	virtual bool init();  

	// there's no 'id' in cpp, so we recommand to return the exactly class pointer
	static cocos2d::CCScene* scene();

	// implement the "static node()" method manually
	LAYER_NODE_FUNC(CGameManage);
	void draw();
	void update(ccTime dt);

	virtual void onEnter();
	virtual void onExit();
	CCLabelTTF* m_showmoney;

	void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
	void updateShowMoney();
	void menuCloseCallback(CCObject* pSender);
	static CGameManage* SharedInstance();
	
private:
	static CGameManage* s_gameManage;
	void createCliffs();
};


#endif